<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8"/>
<title>Metronic | Admin Dashboard Template</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="" name="description"/>
<meta content="" name="author"/>
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<?php
    echo $this->Html->css(Configure::read('adminSettings.css'));
    echo $this->Html->script(Configure::read('adminSettings.js'));
?>
<script>
    var admin_url = '<?php echo $this->Admin->admin_url(); ?>';
    var webroot = '<?php echo $this->webroot; ?>';
</script>

</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">

<!-- BEGIN HEADER -->
    <?php echo $this->element('header'); ?>
<!-- END HEADER -->
<div class="clearfix">
</div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<div class="page-sidebar-wrapper">
		<div class="page-sidebar navbar-collapse collapse">
			<!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu -->
			<!-- BEGIN SIDEBAR MENU -->
                 <?php echo $this->element('sidebar_menu'); ?>
			<!-- END SIDEBAR MENU -->
		</div>
	</div>
	<!-- END SIDEBAR -->
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<?php echo $this->Session->flash(); ?>
        <?php echo $this->fetch('content'); ?> 
	</div>
	<!-- END CONTENT -->
    
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
    <?php echo $this->element('footer'); ?>
<!-- END FOOTER -->


<?php
    $controller_name = $this->params['controller'];
    $link_js = $this->Admin->admin_url().'js/'.$controller_name.'.js';
    //$link_js = '/demo/admin/js/'.$controller_name.'.js';
    echo "<script src='$link_js'></script>";

?>
<script>
$(document).ready(function(){
	$(".fileBrowse2").click(function(){
		var finder = new CKFinder();
		var target = $(this).attr('data-target');
		finder.selectActionFunction = function (fileUrl, data) {
			console.log(fileUrl);
		}
		finder.popup();
	});
});
</script>
<script>
jQuery(document).ready(function() {
   App.init();// initiate layout and plugins
   FormValidation.init();
   FormSamples.init();
   TableManaged.init();
   //TableEditable.init();
});
</script>

<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
